package com.open.capacity.workflow3.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.open.capacity.utils.IdGenerator;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Date;

/**
 * @author
 * @email
 * @date 2023-11-02 21:21:15
 */

@Data
public class NwfProcess implements Serializable {
    private static final long serialVersionUID = 1L;


    private String id;

    private String code;

    private String companyId;

    private String departmentId;

    private String schemeId;

    private String schemeCode;

    private String schemeName;

    private String processTitle;

    private Integer processLevel;

    private Integer isAgain;

    private Integer isStart;

    private Integer isFinished;

    private Integer isChild;

    private Integer isAsyn;

    private String parentNodeId;

    private String parentTaskId;

    private String parentProcessId;

    private String description;

    private Integer enabledMark;

    private String createUserid;

    private String createUsername;

    private String taskId;

    private String taskName;

    private Integer taskType;

    @JsonFormat(timezone="GMT+8",pattern="yyyy-MM-dd HH:mm:ss")
    private Date createTime;

    public NwfProcess create() {
        createTime = new Date();
        code = "P" + IdGenerator.next("process", 6);
        return this;
    }
}
